package com.ft.oa.web.presalesController;

import com.ft.oa.domain.dto.ApiResult;
import com.ft.oa.domain.industrys.IndustryDoc;
import com.ft.oa.service.industryService.IIndustryDocService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.List;
@RestController
@RequestMapping("/industryDoc")
public class IndustryDocController {
    @Autowired
    private IIndustryDocService iIndustryDocService;
    /**
     * 点击行业详情展示附件信息
     */
    @GetMapping("/industryDocList")
    private ApiResult industryDocList(@RequestParam String industryId,String lvalueid,String lfileName,int page,int size){
        return ApiResult.successWithData(iIndustryDocService.industryDocList(industryId,lvalueid,lfileName,page,size));
    }
    /**
     * 新增行业文档
     */
    @PostMapping("/addindustryDoc")
    private ApiResult addindustryDoc(@RequestBody IndustryDoc industryDoc){
        return ApiResult.successWithData(iIndustryDocService.addindustryDoc(industryDoc));
    }
    /**
     * 修改行业文档
     */
    @PostMapping("/updateIndusDoc")
    private ApiResult updateIndusDoc(@RequestBody IndustryDoc industryDoc){
        return ApiResult.successWithData(iIndustryDocService.updateIndusDoc(industryDoc));
    }
    /**
     * 删除行业文档
     */
    @GetMapping("/dellIndusDoc")
    private ApiResult dellIndusDoc(@RequestParam String detailsId){
        return ApiResult.successWithData(iIndustryDocService.dellIndusDoc(detailsId));
    }
}
